package com.csii.activiti.server.core.config;

import com.csii.activiti.server.core.job.FlowCallbackJob;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@Configuration
@EnableScheduling
@EnableAsync
@ConditionalOnProperty(prefix = "activity.callback" ,name = "open" ,havingValue = "true",matchIfMissing = true)
public class JobConfig {

    @Bean
    public FlowCallbackJob flowCallbackJob(){
        return new FlowCallbackJob();
    }

}
